package com.ruoyi.car.vo;

import com.ruoyi.car.domain.TmdCarList;
import com.ruoyi.car.domain.TmdCarUse;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * ClassName: RecordAndListAndUseAndUserAndDeptVO
 * Pacakage: com.ruoyi.car.vo
 * Description:
 *
 * @Author: 刘松泽
 * @Create 2024/4/29 15:36
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RecordAndListAndUseAndUserAndDeptVO {
    /** id 编号 */
    private Long id;

    /** 车辆id 车辆id */
    @Excel(name = "车辆id 车辆id")
    private Long carId;

    /** 创建人id 创建人id */
    @Excel(name = "创建人id 创建人id")
    private String createPersonId;

    /**
     * 创建时间
     */
    private Date createTime;

    /** 操作名称 0：借出，1：归还，2：新增车辆，3：删除车辆，4：编辑车辆 */
    @Excel(name = "操作名称 0：借出，1：归还，2：新增车辆，3：删除车辆，4：编辑车辆")
    private Long operate;

    private TmdCarList carList;

    private TmdCarUse carUse;

    private SysUser sysUser;

    private SysDept sysDept;

    public String getCarColor() {
        if(this.carList != null) {
            return this.carList.getCarColor();
        }
        return null;
    }

    public String getCarCard() {
        if(this.carList != null) {
            return this.carList.getCarCard();
        }
        return null;
    }

    public String getCarName() {
        if(this.carList != null) {
            return this.carList.getCarName();
        }
        return null;
    }

    public String getContext() {
        if(this.carUse != null) {
            return this.carUse.getContext();
        }
        return null;
    }

}
